<{if !$sel_cats}>
    <{if count($data)>0}>
    <div class="js_menu one_b"><h4>全部分类</h4>
        <div class="one_c">
            <{foreach from=$data item=data1 key=gChildId1}>
            <{if $data1.hidden == 'false'}>
            <a href="<{link app=b2c ctl=site_gallery act=index arg0=$data1.cat_id}>"><{$data1.cat_name}></a>
            <{/if}>
            <{/foreach}>
            <div class="bare"></div>
         </div>
    </div>
    <{/if}>
<{else}>
    <{if count($data)>0}>
    <{foreach from=$data item=data1 key=gChildId1}>
    <{if $data1.hidden == 'false'}>
        <div class="js_menu one_b">
        <h4>
        <a href="<{link app=b2c ctl=site_gallery act=index arg0=$data1.cat_id}>"><{$data1.cat_name}></a>
        </h4>
        <div class="one_c">
            <{foreach from=$data1.sub_cats item=data2 key=gChildId1}>
            <{if $data2.hidden == 'false'}>
              <a href="<{link app=b2c ctl=site_gallery act=index arg0=$data2.cat_id}>"><{$data2.cat_name}></a>
            <{/if}>
            <{/foreach}>
            <div class="bare"></div>
         </div>
        </div>
    <{/if}>
    <{/foreach}>
    <{/if}>
<{/if}>